﻿namespace Centido.Management.ConsoleManager
{
    /// <summary>
    ///   A set of commands that can be executed after a users was logged in.
    /// </summary>
    internal class LoggedInCommandSet : CommandSet
    {
        /// <summary>
        ///   Creates a new instance of the <see cref="Centido.Management.ConsoleManager.LoggedInCommandSet"/> class.
        /// </summary>
        public LoggedInCommandSet()
        {
            PopulateCommandSet();
        }


        /// <summary>
        ///   Populates the command set.
        /// </summary>
        private void PopulateCommandSet()
        {
            RegisterCommand(new AddRoleCommand());
            RegisterCommand(new AddRoleInRoleCommand());
            RegisterCommand(new AddUnitCommand());
            RegisterCommand(new AddUserCommand());
            RegisterCommand(new AddUserInRoleCommand());
            RegisterCommand(new AddUserInUnitCommand());
            RegisterCommand(new DeleteRoleCommand());
            RegisterCommand(new DeleteUnitCommand());
            RegisterCommand(new DeleteUserCommand());
            RegisterCommand(new GrantCommand());
            RegisterCommand(new ListPermissionsCommand());
            RegisterCommand(new ListRolesCommand());
            RegisterCommand(new ListTablesCommand());
            RegisterCommand(new ListUnitsCommand());
            RegisterCommand(new ListUsersCommand());
            RegisterCommand(new LogoutCommand());
            RegisterCommand(new RevokeCommand());
            RegisterCommand(new ListRolePrincipalsCommand());
            RegisterCommand(new ListUnitUsersCommand());
            RegisterCommand(new AddUnitInUnitCommand());
            RegisterCommand(new ListUnitChildrenCommand());
            RegisterCommand(new BackupCommand());
            RegisterCommand(new RestoreCommand());
        }
    }
}
